/*prointerFun1.c -- 指针函数1*/
#include "stdio.h"

int* fun1(int* p);
void swap1(int*,int*);

void main(){
    int* p1;
    p1 = (int)100;
    printf("%p\n",fun1(p1));

    int* a = 10;
    int* b = 20;
    printf("a=%p,b=%p\n",&a,&b);
    printf("a=%d,b=%d\n",a,b);
    swap1(&a,&b);
    printf("a=%p,b=%p\n",&a,&b);
    printf("a=%d,b=%d\n",a,b);
}

int* fun1(int* p){
    return p + 1;
}

void swap1(int* a, int* b){
    int tmp = *a;
    *a = *b;
    *b = tmp;
}